<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.14"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>BabyOS: b_hal.c Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="2.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">BabyOS
   &#160;<span id="projectnumber">V1.1.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.14 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',false,false,'search.php','Search');
});
/* @license-end */</script>
<div id="main-nav"></div>
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_b9223522bb56aee4ab59f7ba381d2163.html">bos</a></li><li class="navelem"><a class="el" href="dir_f8a0fa7de2fa8ec1cbca46d8cda2da54.html">hal</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">b_hal.c</div>  </div>
</div><!--header-->
<div class="contents">
<a href="b__hal_8c.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;</div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;<span class="comment">/*Includes ----------------------------------------------*/</span></div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="b__hal_8h.html">b_hal.h</a>&quot;</span>   </div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;</div><div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;<span class="keyword">extern</span> UART_HandleTypeDef <a class="code" href="group___h_a_l___private___variables.html#ga2cf715bef37f7e8ef385a30974a5f0d5">huart1</a>;</div><div class="line"><a name="l00077"></a><span class="lineno"><a class="line" href="group___u_t_i_l_s___private___variables.html#gaf4192a6f2331016cae3bcd9e5f2c7e20">   77</a></span>&#160;<span class="keyword">volatile</span> uint32_t <a class="code" href="group___h_a_l___private___variables.html#gaf4192a6f2331016cae3bcd9e5f2c7e20">bSysTick</a> = 0;</div><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;</div><div class="line"><a name="l00106"></a><span class="lineno"><a class="line" href="group___h_a_l___exported___functions.html#gaf709c07e26adbffa5d9984b2cec63c69">  106</a></span>&#160;<span class="keywordtype">int</span> <a class="code" href="group___h_a_l___exported___functions.html#gaf709c07e26adbffa5d9984b2cec63c69">fputc</a>(<span class="keywordtype">int</span> c, FILE *p)</div><div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;{</div><div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;    uint8_t ch = (uint8_t)(c &amp; 0xff);</div><div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;    HAL_UART_Transmit(&amp;<a class="code" href="group___h_a_l___private___variables.html#ga2cf715bef37f7e8ef385a30974a5f0d5">huart1</a>, &amp;ch, 1, 0xff);    </div><div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;    <span class="keywordflow">return</span> c;</div><div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;}</div><div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;</div><div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;</div><div class="line"><a name="l00114"></a><span class="lineno"><a class="line" href="group___h_a_l___exported___functions.html#gac4b3d313f1c9c001234743725e491b9a">  114</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="group___h_a_l___exported___functions.html#gac4b3d313f1c9c001234743725e491b9a">bHalEnterCritical</a>()</div><div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;{</div><div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;</div><div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;}    </div><div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;</div><div class="line"><a name="l00119"></a><span class="lineno"><a class="line" href="group___h_a_l___exported___functions.html#ga9b005cf96b043e836780e1cc1b9254fc">  119</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="group___h_a_l___exported___functions.html#ga9b005cf96b043e836780e1cc1b9254fc">bHalExitCritical</a>()</div><div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;{</div><div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;</div><div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;}</div><div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;</div><div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;</div><div class="line"><a name="l00128"></a><span class="lineno"><a class="line" href="group___h_a_l___exported___functions.html#ga1e845f28a0763b4046d1c7cdcf227e52">  128</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="group___h_a_l___exported___functions.html#ga1e845f28a0763b4046d1c7cdcf227e52">bHalIncSysTick</a>()</div><div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;{</div><div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;    <a class="code" href="group___h_a_l___private___variables.html#gaf4192a6f2331016cae3bcd9e5f2c7e20">bSysTick</a> += 1;</div><div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;}</div><div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;</div><div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;</div><div class="line"><a name="l00134"></a><span class="lineno"><a class="line" href="group___h_a_l___exported___functions.html#ga67c9cec578e4150ae30c526e88e60f97">  134</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="group___h_a_l___exported___functions.html#ga67c9cec578e4150ae30c526e88e60f97">bHalInit</a>()</div><div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;{</div><div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;    ;<span class="comment">// Add code ...gpio init or some other functions</span></div><div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;}</div><div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;</div><div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;</div><div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;</div><div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;<span class="comment">/************************ Copyright (c) 2019 Bean *****END OF FILE****/</span></div><div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;</div><div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;</div><div class="ttc" id="group___h_a_l___exported___functions_html_ga9b005cf96b043e836780e1cc1b9254fc"><div class="ttname"><a href="group___h_a_l___exported___functions.html#ga9b005cf96b043e836780e1cc1b9254fc">bHalExitCritical</a></div><div class="ttdeci">void bHalExitCritical()</div><div class="ttdef"><b>Definition:</b> <a href="b__hal_8c_source.html#l00119">b_hal.c:119</a></div></div>
<div class="ttc" id="b__hal_8h_html"><div class="ttname"><a href="b__hal_8h.html">b_hal.h</a></div></div>
<div class="ttc" id="group___h_a_l___private___variables_html_gaf4192a6f2331016cae3bcd9e5f2c7e20"><div class="ttname"><a href="group___h_a_l___private___variables.html#gaf4192a6f2331016cae3bcd9e5f2c7e20">bSysTick</a></div><div class="ttdeci">volatile uint32_t bSysTick</div><div class="ttdef"><b>Definition:</b> <a href="b__hal_8c_source.html#l00077">b_hal.c:77</a></div></div>
<div class="ttc" id="group___h_a_l___exported___functions_html_ga1e845f28a0763b4046d1c7cdcf227e52"><div class="ttname"><a href="group___h_a_l___exported___functions.html#ga1e845f28a0763b4046d1c7cdcf227e52">bHalIncSysTick</a></div><div class="ttdeci">void bHalIncSysTick()</div><div class="ttdoc">Call this function _TICK_FRQ_HZ times per second _TICK_FRQ_HZ. </div><div class="ttdef"><b>Definition:</b> <a href="b__hal_8c_source.html#l00128">b_hal.c:128</a></div></div>
<div class="ttc" id="group___h_a_l___exported___functions_html_ga67c9cec578e4150ae30c526e88e60f97"><div class="ttname"><a href="group___h_a_l___exported___functions.html#ga67c9cec578e4150ae30c526e88e60f97">bHalInit</a></div><div class="ttdeci">void bHalInit()</div><div class="ttdef"><b>Definition:</b> <a href="b__hal_8c_source.html#l00134">b_hal.c:134</a></div></div>
<div class="ttc" id="group___h_a_l___private___variables_html_ga2cf715bef37f7e8ef385a30974a5f0d5"><div class="ttname"><a href="group___h_a_l___private___variables.html#ga2cf715bef37f7e8ef385a30974a5f0d5">huart1</a></div><div class="ttdeci">UART_HandleTypeDef huart1</div></div>
<div class="ttc" id="group___h_a_l___exported___functions_html_gaf709c07e26adbffa5d9984b2cec63c69"><div class="ttname"><a href="group___h_a_l___exported___functions.html#gaf709c07e26adbffa5d9984b2cec63c69">fputc</a></div><div class="ttdeci">int fputc(int c, FILE *p)</div><div class="ttdef"><b>Definition:</b> <a href="b__hal_8c_source.html#l00106">b_hal.c:106</a></div></div>
<div class="ttc" id="group___h_a_l___exported___functions_html_gac4b3d313f1c9c001234743725e491b9a"><div class="ttname"><a href="group___h_a_l___exported___functions.html#gac4b3d313f1c9c001234743725e491b9a">bHalEnterCritical</a></div><div class="ttdeci">void bHalEnterCritical()</div><div class="ttdef"><b>Definition:</b> <a href="b__hal_8c_source.html#l00114">b_hal.c:114</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.14
</small></address>
</body>
</html>
